package com.homwee.factory;
import com.homwee.tvap.common.ap.ComSettingManager;
import com.homwee.tvap.common.srvfunc.FactorySetting;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.util.Log;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.widget.RelativeLayout;
import android.widget.TextView;

public class FactoryMacShowActivity extends Activity  {
	TextView macTextViewValue;
	String  ItemName ;
	String  factoryMacStr;
	// For 3D
	public ComSettingManager mcomSettingManager;
	public FactorySetting factorySetting;
	private RelativeLayout mRootLayout,rootLayout;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		LayoutInflater vi = (LayoutInflater) this
		.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
		mRootLayout = (RelativeLayout)vi.inflate(
				R.layout.factory_show_mac_view,null);
		setContentView(mRootLayout);
		
		initView();
		initData();
	}
	private void initView() {
		
		macTextViewValue = (TextView)findViewById(R.id.factory_mac_view_value);
	}
	

	
	public boolean onKeyDown(int keyCode, KeyEvent event) {

		switch (keyCode) {
		case KeyEvent.KEYCODE_MENU:
			this.finish();
			Log.v("KEYCODE_MENU","KEYCODE_MENU="+KeyEvent.KEYCODE_MENU);
			return true;
		default:
			return super.onKeyDown(keyCode, event);
		}

	}
private void initData() {
    rootLayout.bringToFront();
	factorySetting = mcomSettingManager.getFactory(); 
    factoryMacStr = factorySetting.getMAC();
    macTextViewValue.setText(factoryMacStr);	
		
	}
	
}